package expe.one;

import java.util.Scanner;

public class Rg7185 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        if(n <= 1) {
            System.out.println("输入n不是大于1正整数");
        } else {
            for (int i = 2; i <= n; i++) {
                boolean flag = true;
                for (int j = 2; j < i; j++) {
                    if (i % j == 0) {
                        flag = false;
                        break;
                    }
                }
                if (flag) {
                    System.out.print(i + " ");
                }
            }
        }
    }
}
